package net.sf.nwn.jme3;

import java.io.IOException;
import java.io.InputStream;

import com.jme3.asset.AssetInfo;
import com.jme3.asset.AssetLoader;

public class NwnModelLoader implements AssetLoader {

	@Override
	public Object load(AssetInfo assetInfo) throws IOException {
		InputStream stream = assetInfo.openStream();              
		ManualParser parser = new ManualParser(stream,assetInfo.getKey());
		long start = System.currentTimeMillis();
		ModelPrototype definition = parser.definition();
		return definition;
	}

}
